package com.ybkj.o2o.zhuanxian.manager;

import com.ybkj.o2o.zhuanxian.common.DataGrid;
import com.ybkj.o2o.zhuanxian.entity.Car;
import com.ybkj.o2o.zhuanxian.entity.Line;

import java.util.List;
import java.util.Map;

public interface LineManager {

  Line create(Line line);

  Line findById(Long id, String appKey);

  void deleteLine(Long id, String appKey);

  DataGrid<Line> findByParam(Long companyId, String companyName, String name, String startCity,
      String startAddress, String endCity, String endAddress, Integer page, Integer rows,
      String appKey);
  
  DataGrid<Map<String, Object>> findLineByParams(String keyWord, Integer page, Integer rows,String serverUrl, String appKey, Integer isWX);
  
  DataGrid<Map<String, Object>> findEndInfoByStartInfo(
	      String startCity, String startAddress, Integer page, Integer rows,String serverUrl, String appKey);

  void update(Line line);

  List<Line> findByCar(Long carId, String appKey);

  List<Car> findCarByLine(Long lineId, String appKey);

  List<Line> queryLineAll(String city, String appKey);

  List<Line> findLineByCompany(Long companyId, String city, String appKey);

  List<Line> findLineByEmploy(Long employId, String appKey);

  boolean isAlikeLine(Long companyId, String string, String string2, String endCity,
      String endAddress);

  List<Line> findStartEndByLine(String startCity, String endCity, String appKey);

  boolean isUpdateAlikeLine(Long id, Long companyId, String startCity, String startAddress,
      String endCity, String endAddress);

  List<Line> queryline(String city, String startAddress, String endCity,boolean isStatus,
      String appKey);

  boolean isIpentity(Long companyId, String startCity, String startAddress, String endCity,
      String endAddress,String appKey);


  boolean isUpdateIpentity(Long id, Long companyId, String startCity, String startAddress,
      String endCity, String endAddress,String appKey);

  List<String> querylineByCity(String city, String appKey);

  List<Line> lineIsExist(String startCity, String startAddress, String endcity,
      String endAddress, String appKey);

  List<Line> findLineByName(String name, String appKey, Long companyId);
}
